package com.china.school.pojo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

@Repository("address2")
public class Address {
    @Autowired
    private User user;

    @Value("${user.address}")
    private String details;


    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getDetails() {
        return details;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Address{");
        sb.append("user=").append(user);
        sb.append(", details='").append(details).append('\'');
        sb.append('}');
        return sb.toString();
    }

    public void setDetails(String details) {
        this.details = details;
    }
}
